using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/**子弹管理类 */
public class BulletMgr : MonoBehaviour
{
    /**子弹容器 */
    public GameObject bulletPanel;
    
    public static BulletMgr instance;

    private void Awake()
    {
        instance = this;
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    /**发射子弹 */
    public void FireBullet(GameObject bulletPrefab, Vector3 pos, BulletData data)
    {
        var bullet = Instantiate(bulletPrefab, bulletPanel.transform);
        bullet.transform.position = pos;
        bullet.GetComponent<BulletBase>().InitData(data);
    }
}
